package control.action;

import model.VNovelContent;
import business.dao.NovelContentDAO;
import business.dao.NovelDAO;
import business.impl.NovelContentDAOImpl;

import com.opensymphony.xwork2.ActionSupport;

public class DelectChapAction extends BaseAction {
	private int chapterid;
	private int novelid;
	

	public int getNovelid() {
		return novelid;
	}


	public void setNovelid(int novelid) {
		this.novelid = novelid;
	}


	public void setChapterid(int chapterid) {
		this.chapterid = chapterid;
	}

	/**
	 * @return
	 */
	public String execute() {
		NovelContentDAO ncdao = new NovelContentDAOImpl();
		ncdao.deleteContent(chapterid);
		novelid = this.novelid;
		return SUCCESS;
	}
}